﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Emgu.CV;
using Emgu.CV.Structure;
using AsyncCamera.Camera.Structure;

namespace AsyncCamera.Camera.media
{
    public class Frame
    {
        private IImage image;
        private double id;
        private MediaError error;
        private String message;

        public IImage Image
        {
            get { return this.image; }
            set { this.image = value; }
        }

        public double Id
        {
            get { return id; }
            set { this.id = value; }
        }

        public MediaError Error
        {
            get { return error; }
            set { this.error = value; }
        }

        public String Message
        {
            get { return message; }
            set { this.message = value; }
        }

        public Frame Clone()
        {
            Frame clon = new Frame();
            clon.Error = this.Error;
            if (this.Image != null)
                clon.Image = this.image.Clone() as IImage;
            else
                clon.Image = null;
            clon.id = this.id;
            clon.message = this.message;
            return clon;
        }
    }
}
